import 'package:flutter/material.dart';

import 'hero_page_route.dart';

class HeroPage extends StatelessWidget {
  const HeroPage({super.key});

  @override
  Widget build(BuildContext context) {
    print("object");
    return Hero(
      tag: 'hero_page',
      createRectTween: (Rect? begin, Rect? end) {
        return CurvedRectArcTween(begin: begin, end: end);
      },
      child: Scaffold(
        appBar: AppBar(
          title: const Text('HeroPage'),
          leading: IconButton(
            onPressed: () {
              Navigator.of(context).pop();
            },
            icon: const Icon(Icons.arrow_back_ios),
          ),
        ),
        backgroundColor: Colors.transparent,
        body: Container(
          color: Colors.deepOrange,
          child: SizedBox(
            width: 200,
            height: 200,
            child: Image.network(
              'https://source.unsplash.com/1900x3600/?camera,paper',
              width: 100,
              height: 100,
              fit: BoxFit.fill,
            ),
          ),
        ),
      ),
    );
  }
}
